<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登录结果</title>
</head>
<body>
<%
    // 检查会话中是否有账号信息
    String account = (String) session.getAttribute("account");
    String password = (String) session.getAttribute("password");
    boolean isLoginSuccess = "123456".equals(account) && "123456".equals(password);
%>
<%
    if (isLoginSuccess) {
%>
<h2>欢迎回来，<%=account%>！</h2>
<p>您已成功登录网站。</p>
<a href="gwc.jsp">查看购物车</a><br>
<a href="logout.jsp">退出登录</a>
<%
} else {
%>
<h2>登录失败</h2>
<p>账号或密码错误，请重新尝试。</p>
<a href="login.jsp">返回登录页面</a>
<%
    }
%>
</body>
</html>